/* eslint-disable prettier/prettier */
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { HydratedDocument } from 'mongoose';
import { BaseEntity } from 'src/common/schema/baseEntity.schema';

export type OrderrDocument = HydratedDocument<Order>;

@Schema({
  collection: 'order', // 指定集合名称
  timestamps: {
    currentTime: () => Date.now(),
    createdAt: 'createTime',
    updatedAt: 'updateTime',
  },
})
export class Order extends BaseEntity {
  @Prop()
  phone: string;
  
  @Prop()
  OrderNumber: string;
  
  @Prop()
  PaymentIsDone: string;
  
  @Prop()
  age: string;
  
  @Prop()
  description: string;
  
  @Prop()
  identity: string;
  
  @Prop()
  img: Array<string>;
  
  @Prop()
  money: number;
  
  @Prop()
  name: string;
  
  @Prop()
  record: string;
  
  @Prop()
  sex: string;
  
  @Prop()
  time: string;
  
  @Prop()
  creatTime: string;
  
  @Prop()
  docName: string;
  
  @Prop()
  department: string;
  
  @Prop()
  professionalTitle: string;
  
  @Prop()
  hospital: string;
  
  @Prop()
  coupon: number;
  
  @Prop()
  points: number;
  
  @Prop()
  paymentType: string
}

export const OrderSchema = SchemaFactory.createForClass(Order);
